package homework5.exp4;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Test4 {
    public static void main(String[] args) throws UnknownHostException {
        System.out.println("------淘宝的主服务器地址-------");
        InetAddress address=InetAddress.getByName("www.taobao.com");
        System.out.println(address);
        System.out.println("------淘宝的所有服务器地址-------");
        InetAddress[] addresses=InetAddress.getAllByName("www.taobao.com");
        for(InetAddress addr:addresses)
        {
            System.out.println(addr);

        }
    }

}
